﻿
namespace bookMaster.AssetSystem.Windows.Forms
{
	/// <summary>
	/// This is the abstract edit form for the <see cref="Entities.HistoricoPedidos"/> entity.
	/// </summary>
	/// <remarks>This class is overwritten by .netTiers at each generation.</remarks>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class HistoricoPedidosEditControlBase : System.Windows.Forms.UserControl
	{
		#region Fields
		
		//private System.Windows.Forms.TableLayoutPanel uxTableLayoutPanel;
		/// <summary>
		/// The ErrorProvider for the Entity;
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxErrorProvider;
		
		/// <summary>
		/// The BindingSource for the entity.
		///</summary>
		protected System.Windows.Forms.BindingSource uxBindingSource;
						
		
		/// <summary>
		/// TextBox for the IdHistorico property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxIdHistorico;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the IdHistorico property.
		/// </summary>
		protected System.Windows.Forms.Label uxIdHistoricoLabel;
		
		/// <summary>
		/// TextBox for the IdPedido property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxIdPedido;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the IdPedido property.
		/// </summary>
		protected System.Windows.Forms.Label uxIdPedidoLabel;
		
		/// <summary>
		/// TextBox for the IdCliente property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxIdCliente;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the IdCliente property.
		/// </summary>
		protected System.Windows.Forms.Label uxIdClienteLabel;
		
		/// <summary>
		/// DataTimePicker for the FechaPedido property.
		/// </summary>
		protected System.Windows.Forms.DateTimePicker uxFechaPedido;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the FechaPedido property.
		/// </summary>
		protected System.Windows.Forms.Label uxFechaPedidoLabel;
		
		/// <summary>
		/// TextBox for the EstadoPedido property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxEstadoPedido;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the EstadoPedido property.
		/// </summary>
		protected System.Windows.Forms.Label uxEstadoPedidoLabel;
		#endregion
		
		#region Main entity
		private Entities.HistoricoPedidos _HistoricoPedidos;
		/// <summary>
		/// Gets or sets the <see cref="Entities.HistoricoPedidos"/> entity to edit with this form.
		/// </summary>
		/// <value>The <see cref="Entities.HistoricoPedidos"/> instance.</value>
		public Entities.HistoricoPedidos HistoricoPedidos
		{
			get {return this._HistoricoPedidos;}
			set
			{
				this._HistoricoPedidos = value;
				if (value != null) 
				{
					this.uxBindingSource.DataSource = value;
					BindControls();
				}			
				
			}
		}
		#endregion
		
		/// <summary>
		/// Binds the controls.
		/// </summary>
		private void BindControls()
		{
			this.uxIdHistorico.DataBindings.Clear();
			this.uxIdHistorico.DataBindings.Add("Text", this.uxBindingSource, "IdHistorico", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxIdPedido.DataBindings.Clear();
			this.uxIdPedido.DataBindings.Add("Text", this.uxBindingSource, "IdPedido", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxIdCliente.DataBindings.Clear();
			this.uxIdCliente.DataBindings.Add("Text", this.uxBindingSource, "IdCliente", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxFechaPedido.DataBindings.Clear();
			this.uxFechaPedido.DataBindings.Add("Value", this.uxBindingSource, "FechaPedido", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxEstadoPedido.DataBindings.Clear();
			this.uxEstadoPedido.DataBindings.Add("Text", this.uxBindingSource, "EstadoPedido", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
		}					
		
		#region Constructor
		
		/// <summary>
		/// Initializes a new instance of the <see cref="HistoricoPedidosEditControlBase"/> class.
		/// </summary>
		public HistoricoPedidosEditControlBase()
		{
			InitializeComponent();			
			
			this.uxBindingSource.CurrentItemChanged += new System.EventHandler(uxBindingSource_currentItemChanged);
		}		
		
		/// <summary>
		/// 
		/// </summary>
		private void uxBindingSource_currentItemChanged(object sender, System.EventArgs e)
		{
			if (_HistoricoPedidos != null) _HistoricoPedidos.Validate();
		}	
				
		/// <summary>
		/// Initializes the component.
		/// </summary>
		public void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this.uxErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxBindingSource = new System.Windows.Forms.BindingSource(this.components);
			
			//this.uxTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
			this.uxIdHistorico = new System.Windows.Forms.TextBox();
			uxIdHistoricoLabel = new System.Windows.Forms.Label();
			this.uxIdPedido = new System.Windows.Forms.TextBox();
			uxIdPedidoLabel = new System.Windows.Forms.Label();
			this.uxIdCliente = new System.Windows.Forms.TextBox();
			uxIdClienteLabel = new System.Windows.Forms.Label();
			this.uxFechaPedido = new System.Windows.Forms.DateTimePicker();
			uxFechaPedidoLabel = new System.Windows.Forms.Label();
			this.uxEstadoPedido = new System.Windows.Forms.TextBox();
			uxEstadoPedidoLabel = new System.Windows.Forms.Label();
			
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).BeginInit();
			this.SuspendLayout();
			
			// 
			// uxTableLayoutPanel
			// 
			//this.uxTableLayoutPanel.AutoSize = true;
			//this.uxTableLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			//this.uxTableLayoutPanel.ColumnCount = 2;
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 250F));
			//this.uxTableLayoutPanel.Location = new System.Drawing.System.Drawing.Point(3, 3);
			//this.uxTableLayoutPanel.Name = "uxTableLayoutPanel";
			//this.uxTableLayoutPanel.RowCount = 2;
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.Size = new System.Drawing.Size(450, 50);
			//this.uxTableLayoutPanel.TabIndex = 0;
			
			//
			// uxErrorProvider
			//
			this.uxErrorProvider.ContainerControl = this;
			this.uxErrorProvider.DataSource = this.uxBindingSource;
			
			//
			// uxIdHistoricoLabel
			//
			this.uxIdHistoricoLabel.Name = "uxIdHistoricoLabel";
			this.uxIdHistoricoLabel.Text = "Id Historico:";
			this.uxIdHistoricoLabel.Location = new System.Drawing.Point(3, 0);
			this.Controls.Add(this.uxIdHistoricoLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxIdHistoricoLabel);			
			//
			// uxIdHistorico
			//
			this.uxIdHistorico.Name = "uxIdHistorico";
			this.uxIdHistorico.ReadOnly = true;
			//this.uxTableLayoutPanel.Controls.Add(this.uxIdHistorico);
			this.uxIdHistorico.Location = new System.Drawing.Point(160, 0);
			this.Controls.Add(this.uxIdHistorico);
			//
			// uxIdPedidoLabel
			//
			this.uxIdPedidoLabel.Name = "uxIdPedidoLabel";
			this.uxIdPedidoLabel.Text = "Id Pedido:";
			this.uxIdPedidoLabel.Location = new System.Drawing.Point(3, 26);
			this.Controls.Add(this.uxIdPedidoLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxIdPedidoLabel);			
			//
			// uxIdPedido
			//
			this.uxIdPedido.Name = "uxIdPedido";
			//this.uxTableLayoutPanel.Controls.Add(this.uxIdPedido);
			this.uxIdPedido.Location = new System.Drawing.Point(160, 26);
			this.Controls.Add(this.uxIdPedido);
			//
			// uxIdClienteLabel
			//
			this.uxIdClienteLabel.Name = "uxIdClienteLabel";
			this.uxIdClienteLabel.Text = "Id Cliente:";
			this.uxIdClienteLabel.Location = new System.Drawing.Point(3, 52);
			this.Controls.Add(this.uxIdClienteLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxIdClienteLabel);			
			//
			// uxIdCliente
			//
			this.uxIdCliente.Name = "uxIdCliente";
			//this.uxTableLayoutPanel.Controls.Add(this.uxIdCliente);
			this.uxIdCliente.Location = new System.Drawing.Point(160, 52);
			this.Controls.Add(this.uxIdCliente);
			//
			// uxFechaPedidoLabel
			//
			this.uxFechaPedidoLabel.Name = "uxFechaPedidoLabel";
			this.uxFechaPedidoLabel.Text = "Fecha Pedido:";
			this.uxFechaPedidoLabel.Location = new System.Drawing.Point(3, 78);
			this.Controls.Add(this.uxFechaPedidoLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxFechaPedidoLabel);			
			//
			// uxFechaPedido
			//
			this.uxFechaPedido.Name = "uxFechaPedido";
			//this.uxTableLayoutPanel.Controls.Add(this.uxFechaPedido);
			this.uxFechaPedido.Location = new System.Drawing.Point(160, 78);
			this.Controls.Add(this.uxFechaPedido);
			//
			// uxEstadoPedidoLabel
			//
			this.uxEstadoPedidoLabel.Name = "uxEstadoPedidoLabel";
			this.uxEstadoPedidoLabel.Text = "Estado Pedido:";
			this.uxEstadoPedidoLabel.Location = new System.Drawing.Point(3, 104);
			this.Controls.Add(this.uxEstadoPedidoLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxEstadoPedidoLabel);			
			//
			// uxEstadoPedido
			//
			this.uxEstadoPedido.Name = "uxEstadoPedido";
			//this.uxTableLayoutPanel.Controls.Add(this.uxEstadoPedido);
			this.uxEstadoPedido.Location = new System.Drawing.Point(160, 104);
			this.Controls.Add(this.uxEstadoPedido);
			// 
			// HistoricoPedidosEditControlBase
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			//this.Controls.Add(this.uxTableLayoutPanel);
			this.AutoScroll = true;
			this.Name = "HistoricoPedidosEditControlBase";
			this.Size = new System.Drawing.Size(478, 311);
			//this.Localizable = true;
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).EndInit();			
			this.ResumeLayout(false);
			this.PerformLayout();
		}
		#endregion
				
		#region ComboBox List
		
		
		#endregion
		
        #region Field visibility

        /// <summary>
        /// Indicates if the controls associated with the uxIdHistorico property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxIdHistoricoVisible
        {
            get { return this.uxIdHistorico.Visible; }
            set
            {
                this.uxIdHistoricoLabel.Visible = value;
                this.uxIdHistorico.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxIdHistorico property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxIdHistoricoEnabled
        {
            get { return this.uxIdHistorico.Enabled; }
            set
            {
                this.uxIdHistorico.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxIdPedido property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxIdPedidoVisible
        {
            get { return this.uxIdPedido.Visible; }
            set
            {
                this.uxIdPedidoLabel.Visible = value;
                this.uxIdPedido.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxIdPedido property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxIdPedidoEnabled
        {
            get { return this.uxIdPedido.Enabled; }
            set
            {
                this.uxIdPedido.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxIdCliente property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxIdClienteVisible
        {
            get { return this.uxIdCliente.Visible; }
            set
            {
                this.uxIdClienteLabel.Visible = value;
                this.uxIdCliente.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxIdCliente property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxIdClienteEnabled
        {
            get { return this.uxIdCliente.Enabled; }
            set
            {
                this.uxIdCliente.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxFechaPedido property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxFechaPedidoVisible
        {
            get { return this.uxFechaPedido.Visible; }
            set
            {
                this.uxFechaPedidoLabel.Visible = value;
                this.uxFechaPedido.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxFechaPedido property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxFechaPedidoEnabled
        {
            get { return this.uxFechaPedido.Enabled; }
            set
            {
                this.uxFechaPedido.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxEstadoPedido property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxEstadoPedidoVisible
        {
            get { return this.uxEstadoPedido.Visible; }
            set
            {
                this.uxEstadoPedidoLabel.Visible = value;
                this.uxEstadoPedido.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxEstadoPedido property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxEstadoPedidoEnabled
        {
            get { return this.uxEstadoPedido.Enabled; }
            set
            {
                this.uxEstadoPedido.Enabled = value;
            }
        }

        #endregion

		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;

		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	}
}
